/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package amfservices;

import java.util.HashMap;
//import utilities.database.bulk.ILoaderEntity;
//import utilities.database.bulk.UniqueEntityPointer;
//import vo.connectors.GameCache;
//import vo.models.CarObject;

/**
 *
 * @author quocpt
 */
public class ClientApp
{

//    private int userId;
//    private boolean isNewuser;
//    private HashMap<String, UniqueEntityPointer<CarObject>> carsObj = new HashMap<String, UniqueEntityPointer<CarObject>>();
//    private HashMap<String, Object> loaderEntList = new HashMap<String, Object>();
//
//    public void setUserId(int userId)
//    {
//	this.userId = userId;
//    }
//
//    public void setIsNewuser(boolean isNewuser)
//    {
//	this.isNewuser = isNewuser;
//    }
//
//    public <T extends ILoaderEntity> void setEntLoader(String name, UniqueEntityPointer<T> ent)
//    {
//	loaderEntList.put(name, ent);
//    }
//
//    public void setCarObj(UniqueEntityPointer<CarObject> car)
//    {
//	String carDataKey = car.getPtr().getKey();
//	carsObj.put(carDataKey, car);
//    }
//
//    //==============
//    public int getUserId()
//    {
//	return this.userId;
//    }
//
//    public boolean getIsNewuser()
//    {
//	return isNewuser;
//    }
//
//    public UniqueEntityPointer<CarObject> getCarObj(int ownerId, int carId)
//    {
//	String carDataKey = GameCache.buildCarObjectKey(ownerId, carId);
//	return carsObj.get(carDataKey);
//    }
//    
//    public CarObject getCarObjPtr(int ownerId, int carId)
//    {
//	String carDataKey = GameCache.buildCarObjectKey(ownerId, carId);
//	return carsObj.get(carDataKey).getPtr();
//    }
//
//    @SuppressWarnings("unchecked")
//    public <T extends ILoaderEntity> UniqueEntityPointer<T> getEntLoader(String name)
//    {
//	return (UniqueEntityPointer<T>) loaderEntList.get(name);
//    }
//    
//    @SuppressWarnings("unchecked")
//    public <T extends ILoaderEntity> T getEntLoaderPtr(String name)
//    {
//	return ((UniqueEntityPointer<T>) loaderEntList.get(name)).getPtr();
//    }
}
